<template>
	<view>
		<card title="账号管理"
		v-for="(item, index) in list" :key="index">
			<uni-list >
				<uni-list-item :title="item2.title"
				:showArrow="true"
				v-for="(item2, index2) in item.value" :key="index2"
				:to="getPath(item2.path)"></uni-list-item>
			</uni-list>
		</card>
		<view class="p-3">
			<button type="default" class="bg-white">推出登录</button>
		</view>
	</view>
</template>

<script>
	import card from "@/components/common/card.vue"
	import uniList from "@/components/uni-ui/uni-list/uni-list.vue"
	import uniListItem from "@/components/uni-ui/uni-list-item/uni-list-item.vue"
	
	export default {
		components: {
			card,
			uniList,
			uniListItem,
		},
		
		data() {
			return {
				list: [
					{
						label:  "账号管理",
						value: [
							{title: "个人资料", path: "user-set"},
							{title: "收货地址", path: ""}
						]
					},
					{
						label:  "关于",
						value: [
							{title: "关于商城", path: "about"},
							{title: "意见反馈", path: ""},
							{title: "协议规则", path: ""},
							{title: "资质证件", path: ""},
							{title: "用户协议", path: ""},
							{title: "隐私政策", path: ""},
						]
					}
				]
			}
		},
		methods: {
			getPath(path) {
				if (!path) return ''
				let r = `/pages/${path}/${path}`
				console.log(r)
				return r
			}
		}
	}
</script>

<style>
page{
	background-color: #EEEEEE;
}
</style>
